@extends("backend.master")
@section("content")
	<h2>{{$title}}</h2>
		{{Form::open(array("route"=>"edit_post","files"=>true))}}

		<p class="minihead">Chuyên mục:</p>
		{{Form::select("cate",$cate,$posts->categorieID)}}

		<input type="hidden" name="post_id" value="{{$posts->id}}"> 

		<p class="minihead">Tiêu đề:</p>
		{{Form::text('title',$posts->title,array('class'=>'form-control'))}}

		<p class="minihead">Mô tả ngắn:</p>
		{{Form::textarea("description",$posts->description,array("class"=>"form-control"))}}

		<p class="minihead">Nội dung:</p>
		{{Form::textarea("content",$posts->content,array("class"=>"form-control"))}}

		<p class="minihead">Images:</p>
		<img src="{{$posts->img}}" style="width:150px;height:150px" class="img-thumbnail">
		{{Form::file("img")}} <br>

		{{Form::submit("Sửa bài viết",array("class"=>"btn btn-primary btn-lg"))}}
		
		{{Form::close()}}
	
@endsection

@section('data_code')
	<script language="javascript">
		
		$(function () {
		  CKEDITOR.replace('content', {
		   filebrowserBrowseUrl: '/ckfinder/ckfinder.html',
		   filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?type=Images',
		   filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?type=Flash',
		   filebrowserUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
		   filebrowserImageUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
		   filebrowserFlashUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'

		  });
 		});
	</script>
@endsection